<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::face_detection::FeatureHandlerDepthAverage&lt; FT, DataSet, ExampleIndex &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1face__detection_1_1_feature_handler_depth_average.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="classpcl_1_1face__detection_1_1_feature_handler_depth_average-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::face_detection::FeatureHandlerDepthAverage&lt; FT, DataSet, ExampleIndex &gt; 模板类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
类 pcl::face_detection::FeatureHandlerDepthAverage&lt; FT, DataSet, ExampleIndex &gt; 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classpcl_1_1face__detection_1_1_feature_handler_depth_average.png" usemap="#pcl::face_5Fdetection::FeatureHandlerDepthAverage_3C_20FT_2C_20DataSet_2C_20ExampleIndex_20_3E_map" alt=""/>
  <map id="pcl::face_5Fdetection::FeatureHandlerDepthAverage_3C_20FT_2C_20DataSet_2C_20ExampleIndex_20_3E_map" name="pcl::face_5Fdetection::FeatureHandlerDepthAverage_3C_20FT_2C_20DataSet_2C_20ExampleIndex_20_3E_map">
<area href="classpcl_1_1_feature_handler.html" alt="pcl::FeatureHandler&lt; FT, DataSet, ExampleIndex &gt;" shape="rect" coords="0,0,473,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a063ea354c83374ef8dd4167e09bf3a0a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html#a063ea354c83374ef8dd4167e09bf3a0a">setWSize</a> (int w)</td></tr>
<tr class="memdesc:a063ea354c83374ef8dd4167e09bf3a0a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the size of the window to extract features.  <a href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html#a063ea354c83374ef8dd4167e09bf3a0a">更多...</a><br /></td></tr>
<tr class="separator:a063ea354c83374ef8dd4167e09bf3a0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9eb8bc9d8dbfe04e7d12fce2495359d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html#ac9eb8bc9d8dbfe04e7d12fce2495359d">setNumChannels</a> (int nf)</td></tr>
<tr class="memdesc:ac9eb8bc9d8dbfe04e7d12fce2495359d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the number of channels a feature has (i.e. 1 - depth, 4 - depth + normals)  <a href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html#ac9eb8bc9d8dbfe04e7d12fce2495359d">更多...</a><br /></td></tr>
<tr class="separator:ac9eb8bc9d8dbfe04e7d12fce2495359d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1534caca4512eda3d0ce165f62ef4cf9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html#a1534caca4512eda3d0ce165f62ef4cf9">setMaxPatchSize</a> (int w)</td></tr>
<tr class="memdesc:a1534caca4512eda3d0ce165f62ef4cf9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a set of random tests to evaluate examples.  <a href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html#a1534caca4512eda3d0ce165f62ef4cf9">更多...</a><br /></td></tr>
<tr class="separator:a1534caca4512eda3d0ce165f62ef4cf9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d139c5099b1f0b68961cf54aa109dad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html#a4d139c5099b1f0b68961cf54aa109dad">createRandomFeatures</a> (const size_t num_of_features, std::vector&lt; FT &gt; &amp;features)</td></tr>
<tr class="memdesc:a4d139c5099b1f0b68961cf54aa109dad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a set of random tests to evaluate examples.  <a href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html#a4d139c5099b1f0b68961cf54aa109dad">更多...</a><br /></td></tr>
<tr class="separator:a4d139c5099b1f0b68961cf54aa109dad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64aa9273710c173d8ed7214fcdce91d6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html#a64aa9273710c173d8ed7214fcdce91d6">evaluateFeature</a> (const FT &amp;feature, DataSet &amp;data_set, std::vector&lt; ExampleIndex &gt; &amp;examples, std::vector&lt; float &gt; &amp;results, std::vector&lt; unsigned char &gt; &amp;flags) const</td></tr>
<tr class="memdesc:a64aa9273710c173d8ed7214fcdce91d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Evaluates a feature on the specified set of examples.  <a href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html#a64aa9273710c173d8ed7214fcdce91d6">更多...</a><br /></td></tr>
<tr class="separator:a64aa9273710c173d8ed7214fcdce91d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84f08ec6e223bcd3db975cf2c597d9e9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html#a84f08ec6e223bcd3db975cf2c597d9e9">evaluateFeature</a> (const FT &amp;feature, DataSet &amp;data_set, const ExampleIndex &amp;example, float &amp;result, unsigned char &amp;flag) const</td></tr>
<tr class="memdesc:a84f08ec6e223bcd3db975cf2c597d9e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Evaluates a feature on the specified example.  <a href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html#a84f08ec6e223bcd3db975cf2c597d9e9">更多...</a><br /></td></tr>
<tr class="separator:a84f08ec6e223bcd3db975cf2c597d9e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a093bec62b9ad8bc70343a9807605a2"><td class="memItemLeft" align="right" valign="top"><a id="a8a093bec62b9ad8bc70343a9807605a2"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html#a8a093bec62b9ad8bc70343a9807605a2">generateCodeForEvaluation</a> (const FT &amp;, ::std::ostream &amp;) const</td></tr>
<tr class="memdesc:a8a093bec62b9ad8bc70343a9807605a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates evaluation code for the specified feature and writes it to the specified stream. <br /></td></tr>
<tr class="separator:a8a093bec62b9ad8bc70343a9807605a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classpcl_1_1_feature_handler"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classpcl_1_1_feature_handler')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classpcl_1_1_feature_handler.html">pcl::FeatureHandler&lt; FT, DataSet, ExampleIndex &gt;</a></td></tr>
<tr class="memitem:aa77260777b79014f5d3645f65562c699 inherit pub_methods_classpcl_1_1_feature_handler"><td class="memItemLeft" align="right" valign="top"><a id="aa77260777b79014f5d3645f65562c699"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_feature_handler.html#aa77260777b79014f5d3645f65562c699">~FeatureHandler</a> ()</td></tr>
<tr class="memdesc:aa77260777b79014f5d3645f65562c699 inherit pub_methods_classpcl_1_1_feature_handler"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:aa77260777b79014f5d3645f65562c699 inherit pub_methods_classpcl_1_1_feature_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:a980e8ec1d9ed0a524eb67b82cc6aecdf"><td class="memItemLeft" align="right" valign="top"><a id="a980e8ec1d9ed0a524eb67b82cc6aecdf"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>wsize_</b></td></tr>
<tr class="separator:a980e8ec1d9ed0a524eb67b82cc6aecdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21e32256c29ca084a3192a3dcacec1b8"><td class="memItemLeft" align="right" valign="top"><a id="a21e32256c29ca084a3192a3dcacec1b8"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>max_patch_size_</b></td></tr>
<tr class="separator:a21e32256c29ca084a3192a3dcacec1b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a722bf286d4df54bf194e14c485397ae0"><td class="memItemLeft" align="right" valign="top"><a id="a722bf286d4df54bf194e14c485397ae0"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>num_channels_</b></td></tr>
<tr class="separator:a722bf286d4df54bf194e14c485397ae0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e5d7521993a6e251d8020e4265e321d"><td class="memItemLeft" align="right" valign="top"><a id="a7e5d7521993a6e251d8020e4265e321d"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>min_valid_small_patch_depth_</b></td></tr>
<tr class="separator:a7e5d7521993a6e251d8020e4265e321d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">成员函数说明</h2>
<a id="a4d139c5099b1f0b68961cf54aa109dad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d139c5099b1f0b68961cf54aa109dad">&#9670;&nbsp;</a></span>createRandomFeatures()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class FT , class DataSet , class ExampleIndex &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html">pcl::face_detection::FeatureHandlerDepthAverage</a>&lt; FT, DataSet, ExampleIndex &gt;::createRandomFeatures </td>
          <td>(</td>
          <td class="paramtype">const size_t&#160;</td>
          <td class="paramname"><em>num_of_features</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; FT &gt; &amp;&#160;</td>
          <td class="paramname"><em>features</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a set of random tests to evaluate examples. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">num_of_features</td><td>Number features to generated. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">features</td><td>Generated features. </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="classpcl_1_1_feature_handler.html#a2a2983e7bb571ec42225aec1024f55cb">pcl::FeatureHandler&lt; FT, DataSet, ExampleIndex &gt;</a>.</p>
<div class="fragment"><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        {</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;          srand (<span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">&gt;</span>(time (NULL)));</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;          <span class="keywordtype">int</span> min_s = 20;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;          <span class="keywordtype">float</span> range_d = 0.05f;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;          <span class="keywordtype">float</span> incr_d = 0.01f;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160; </div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;          std::vector &lt; FT &gt; windows_and_functions;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160; </div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;          <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; num_of_features; i++)</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;          {</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;            FT f;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;            f.row1_ = rand () % (wsize_ - max_patch_size_ - 1);</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;            f.col1_ = rand () % (wsize_ / 2 - max_patch_size_ - 1);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;            f.wsizex1_ = min_s + (rand () % (max_patch_size_ - min_s - 1));</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;            f.wsizey1_ = min_s + (rand () % (max_patch_size_ - min_s - 1));</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160; </div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;            f.row2_ = rand () % (wsize_ - max_patch_size_ - 1);</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;            f.col2_ = wsize_ / 2 + rand () % (wsize_ / 2 - max_patch_size_ - 1);</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;            f.wsizex2_ = min_s + (rand () % (max_patch_size_ - 1 - min_s));</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;            f.wsizey2_ = min_s + (rand () % (max_patch_size_ - 1 - min_s));</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;            f.used_ii_ = 0;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;            <span class="keywordflow">if</span> (num_channels_ &gt; 1)</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;              f.used_ii_ = rand () % num_channels_;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160; </div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;            windows_and_functions.push_back (f);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;          }</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160; </div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;          <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; windows_and_functions.size (); i++)</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;          {</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;            FT f = windows_and_functions[i];</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt;= 10; j++)</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;            {</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;              f.threshold_ = -range_d + <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (j) * incr_d;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;              features.push_back (f);</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;            }</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;          }</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a84f08ec6e223bcd3db975cf2c597d9e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84f08ec6e223bcd3db975cf2c597d9e9">&#9670;&nbsp;</a></span>evaluateFeature() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class FT , class DataSet , class ExampleIndex &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html">pcl::face_detection::FeatureHandlerDepthAverage</a>&lt; FT, DataSet, ExampleIndex &gt;::evaluateFeature </td>
          <td>(</td>
          <td class="paramtype">const FT &amp;&#160;</td>
          <td class="paramname"><em>feature</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DataSet &amp;&#160;</td>
          <td class="paramname"><em>data_set</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const ExampleIndex &amp;&#160;</td>
          <td class="paramname"><em>example</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char &amp;&#160;</td>
          <td class="paramname"><em>flag</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Evaluates a feature on the specified example. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">feature</td><td>The feature to evaluate. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data_set</td><td>The data set on which the feature is evaluated. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">example</td><td>The example of the data set the feature is evaluated on. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>The destination for the result of the feature evaluation. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">flag</td><td>Flags that are supplied together with the results. </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="classpcl_1_1_feature_handler.html#aad68361b8d7d046f9a15c19a36366c34">pcl::FeatureHandler&lt; FT, DataSet, ExampleIndex &gt;</a>.</p>
<div class="fragment"><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;        {</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;          TrainingExample te = data_set[example];</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;          <span class="keywordtype">int</span> el_f1 = te.iimages_[feature.used_ii_]-&gt;getFiniteElementsCount (te.col_ + feature.col1_, te.row_ + feature.row1_, feature.wsizex1_,</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;              feature.wsizey1_);</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;          <span class="keywordtype">int</span> el_f2 = te.iimages_[feature.used_ii_]-&gt;getFiniteElementsCount (te.col_ + feature.col2_, te.row_ + feature.row2_, feature.wsizex2_,</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;              feature.wsizey2_);</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160; </div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;          <span class="keywordtype">float</span> sum_f1 = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(te.iimages_[feature.used_ii_]-&gt;getFirstOrderSum (te.col_ + feature.col1_, te.row_ + feature.row1_, feature.wsizex1_, feature.wsizey1_));</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;          <span class="keywordtype">float</span> sum_f2 = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(te.iimages_[feature.used_ii_]-&gt;getFirstOrderSum (te.col_ + feature.col2_, te.row_ + feature.row2_, feature.wsizex2_, feature.wsizey2_));</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160; </div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;          <span class="keywordtype">float</span> f = min_valid_small_patch_depth_;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;          <span class="keywordflow">if</span> (el_f1 == 0 || el_f2 == 0 || (el_f1 &lt;= <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span> (f * <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(feature.wsizex1_ * feature.wsizey1_)))</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;              || (el_f2 &lt;= <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span> (f * <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(feature.wsizex2_ * feature.wsizey2_))))</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;          {</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;            result = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (pcl_round (<span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(rand ()) / <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (RAND_MAX)));</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;            flag = 1;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;          } <span class="keywordflow">else</span></div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;          {</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;            result = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> ((sum_f1 / <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(el_f1) - sum_f2 / <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(el_f2)) &gt; feature.threshold_);</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;            flag = 0;</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;          }</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a64aa9273710c173d8ed7214fcdce91d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64aa9273710c173d8ed7214fcdce91d6">&#9670;&nbsp;</a></span>evaluateFeature() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class FT , class DataSet , class ExampleIndex &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html">pcl::face_detection::FeatureHandlerDepthAverage</a>&lt; FT, DataSet, ExampleIndex &gt;::evaluateFeature </td>
          <td>(</td>
          <td class="paramtype">const FT &amp;&#160;</td>
          <td class="paramname"><em>feature</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DataSet &amp;&#160;</td>
          <td class="paramname"><em>data_set</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; ExampleIndex &gt; &amp;&#160;</td>
          <td class="paramname"><em>examples</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; float &gt; &amp;&#160;</td>
          <td class="paramname"><em>results</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; unsigned char &gt; &amp;&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Evaluates a feature on the specified set of examples. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">feature</td><td>The feature to evaluate. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data_set</td><td>The data set on which the feature is evaluated. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">examples</td><td>The set of examples of the data set the feature is evaluated on. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">results</td><td>The destination for the results of the feature evaluation. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">flags</td><td>Flags that are supplied together with the results. </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="classpcl_1_1_feature_handler.html#a1131f1c17f4b600506c88ca722902ae5">pcl::FeatureHandler&lt; FT, DataSet, ExampleIndex &gt;</a>.</p>
<div class="fragment"><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        {</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;          results.resize (examples.size ());</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;          <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; examples.size (); i++)</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;          {</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;            <a class="code" href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html#a64aa9273710c173d8ed7214fcdce91d6">evaluateFeature</a> (feature, data_set, examples[i], results[i], flags[i]);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;          }</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        }</div>
<div class="ttc" id="aclasspcl_1_1face__detection_1_1_feature_handler_depth_average_html_a64aa9273710c173d8ed7214fcdce91d6"><div class="ttname"><a href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html#a64aa9273710c173d8ed7214fcdce91d6">pcl::face_detection::FeatureHandlerDepthAverage::evaluateFeature</a></div><div class="ttdeci">void evaluateFeature(const FT &amp;feature, DataSet &amp;data_set, std::vector&lt; ExampleIndex &gt; &amp;examples, std::vector&lt; float &gt; &amp;results, std::vector&lt; unsigned char &gt; &amp;flags) const</div><div class="ttdoc">Evaluates a feature on the specified set of examples.</div><div class="ttdef"><b>Definition:</b> rf_face_utils.h:143</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a1534caca4512eda3d0ce165f62ef4cf9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1534caca4512eda3d0ce165f62ef4cf9">&#9670;&nbsp;</a></span>setMaxPatchSize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class FT , class DataSet , class ExampleIndex &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html">pcl::face_detection::FeatureHandlerDepthAverage</a>&lt; FT, DataSet, ExampleIndex &gt;::setMaxPatchSize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a set of random tests to evaluate examples. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">w</td><td>Number features to generate. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        {</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;          max_patch_size_ = w;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ac9eb8bc9d8dbfe04e7d12fce2495359d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac9eb8bc9d8dbfe04e7d12fce2495359d">&#9670;&nbsp;</a></span>setNumChannels()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class FT , class DataSet , class ExampleIndex &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html">pcl::face_detection::FeatureHandlerDepthAverage</a>&lt; FT, DataSet, ExampleIndex &gt;::setNumChannels </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nf</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the number of channels a feature has (i.e. 1 - depth, 4 - depth + normals) </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">nf</td><td>Number of channels. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        {</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;          num_channels_ = nf;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a063ea354c83374ef8dd4167e09bf3a0a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a063ea354c83374ef8dd4167e09bf3a0a">&#9670;&nbsp;</a></span>setWSize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class FT , class DataSet , class ExampleIndex &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html">pcl::face_detection::FeatureHandlerDepthAverage</a>&lt; FT, DataSet, ExampleIndex &gt;::setWSize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the size of the window to extract features. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">w</td><td>Window size. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        {</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;          wsize_ = w;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>recognition/include/pcl/recognition/face_detection/<a class="el" href="rf__face__utils_8h_source.html">rf_face_utils.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><b>face_detection</b></li><li class="navelem"><a class="el" href="classpcl_1_1face__detection_1_1_feature_handler_depth_average.html">FeatureHandlerDepthAverage</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
